import 'package:flutter/material.dart';
import 'package:flutter_menu/app_config.dart';
import 'package:flutter_menu/biz/order/order_pg.dart';
import 'package:flutter_menu/data/base_provider.dart';
import 'package:flutter_menu/data/provider/formula_provider.dart';
import 'package:flutter_menu/model/formula_model.dart';
import 'package:flutter_menu/model/material_model.dart';
import 'package:flutter_menu/model/menu_model.dart';
import 'package:flutter_menu/model/product_model.dart';
import 'package:flutter_menu/objectbox.g.dart';
import 'package:get/get.dart';

class OptionMaterialProvider extends BaseProvider<OptionMaterialModel> {
  OptionMaterialProvider(super.store);

  Future<OptionMaterialModel?> getFormulaModelWithOptionId(String specId, String optionId) {
    return box
        .query(OptionMaterialModel_.specsUuid.equals(specId) & OptionMaterialModel_.optionId.equals(optionId))
        .build()
        .findFirstAsync();
  }
}

